'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  // 首页
  router.get('/', controller.home.index);
  //查看已经领取的任务
  router.get('/view/doTask', controller.home.viewDoTask);
  //查看已经完成的任务
  router.get('/view/getAllDone', controller.home.viewGetAllDone);
  router.get('/getAllDone', controller.home.getAllDone);

  router.get('/getCanDoTask', controller.home.getCanDoTask);


  //截屏
  router.get('/screenshot', controller.home.screenshot);
  
  // 获取已经领取的任务
  router.get('/makeTaskData', controller.home.makeTaskData);
  // 做任务
  router.post('/doTask', controller.home.doTask);
  // 准备图片
  router.post('/handerImages', controller.home.handerImages);
  // 领任务
  router.post('/getTask', controller.home.getTask);

  router.get('/test', controller.home.test);
};
